package com.vastcom.sigma.admin.dao;


import com.vastcom.sigma.admin.model.Blockchaindb;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BlockChaindbDao extends JpaRepository<Blockchaindb,String> {

    @Query("select b from Blockchaindb b  order by b.slsj desc ")
    List<Blockchaindb> getBlockchainBySlsjDesc();

    @Query("select b from Blockchaindb b where b.keyname =:keyname")
    Blockchaindb getBlockchaindbByKeyname(@Param("keyname")String name);
}
